package com.feihong.yw189.bluetooth.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;

import com.feihong.yw189.R;


/**
 * 进度条弹窗
 * 2017.2.6
 */

public class MyUsualyDialog extends Dialog {
    private Context mcontext;

    private int mView;
    public MyUsualyDialog(Context context, int view) {
        super(context, R.style.QiaoDaoDialogStyle);
        this.mcontext = context;
        this.mView = view;

    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(mView);
        Window window = getWindow();
        WindowManager.LayoutParams params = window.getAttributes();
        params.gravity = Gravity.CENTER;
        window.setAttributes(params);
    }
    public void setWarningTxt(int warningTvID,String warningTxt){
        TextView mProgressWarningTv = findViewById(warningTvID);
        if(mProgressWarningTv != null){
            mProgressWarningTv.setText(warningTxt);
        }
    }
}
